<div class="content-header">
    <table cellspacing="0">
        <tr>
            <td><h3><?php echo Mage::helper('goldsys')->__($this->getTitle()) ?></h3></td>
            <td>
                <?php if ($this->getExtensions()): ?>
                    <?php echo $this->__('View By Extension: '); ?>
                        <select name="extension" class="select" onchange="javascript: document.location = this.value;">
                                <option value="<?php echo $this->getExtensionUrl(''); ?>"><?php echo $this->__('All Extensions'); ?></option>
                            <?php foreach ($this->getExtensions() as $key => $name): ?>
                                <option value="<?php echo $key; ?>" <?php if ($this->getSelfUrl() == $key): ?> selected="selected"<?php endif; ?>><?php echo $name; ?></option>
                            <?php endforeach; ?>
                        </select>
                <?php endif; ?>
            </td>
            <td class="form-buttons"><?php echo $this->getResetButtonHtml(); ?><?php echo $this->getSaveButtonHtml(); ?></td>
         </tr>
    </table>
</div>
<div class="entry-edit">
    <table class="goldsys-list">
      <tr>
        <td class="list">
          <div class="form">
            <form action="<?php echo $this->getSaveUrl(); ?>" method="post" id="rewritesForm">
                <?php echo $this->getBlockHtml('formkey'); ?>
                <div class="entry-edit">
                    <div class="entry-edit-head">
                    <h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Rewrites Order'); ?></h4>
                </div>
                <div class="fieldset" id="rewrite_orders">
                    <div class="hor-scroll">
                        <table width="100%" cellspacing="4" cellpadding="4">
                        <?php $conflicts = $this->getConflictGroups(); ?>
                            <?php if (!empty($conflicts)): ?>
                                <?php foreach ($conflicts as $baseClass => $classes): ?>
                                    <?php $i = 1; ?>
                                    <?php foreach ($classes as $class): ?>
                                    <tr>
                                        <td width="50"><input type="text" name="rewrites[<?php echo $baseClass; ?>][<?php echo $class; ?>]" size="2" value="<?php echo $i++; ?>" class="input-text required-entry validate-number" /></td>
                                        <td>
                                            <pre><?php echo $class; ?></pre> 
                                            extends
                                        </td>
                                    </tr>
                                    <?php endforeach; ?>
                                    <tr>
                                        <td></td>
                                        <td>
                                            <pre><strong><?php echo $baseClass; ?></strong></pre>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" height="40"></td>
                                    </tr>
                                <?php endforeach; ?>
                            <?php else: ?>
                                <?php echo $this->__('No rewrite conflicts found'); ?>
                            <?php endif; ?>
                        </table>
                    </div>
                </div>
                <div class="entry-edit">
                    <div class="entry-edit-head">
                    <h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Exclude Base Classes'); ?></h4>
                </div>
                <div class="fieldset" id="exclude_base_classes_block">
                    <div class="hor-scroll">
                        <table cellspacing="0" class="form-list">
                            <tr>
                                <td class="label">
                                    <label for="goldsys_exclude_base_classes"><?php echo $this->__('Indicate names of all base Magento classes, that you wouldn\'t like to overwrite'); ?></label>
                                </td>
                                <td class="value">
                                    <textarea id="goldsys_exclude_base_classes" name="exclude_classes" class=" textarea" rows="2" cols="15"><?php echo $this->getExcludedClasses();?></textarea>
                                    <p class="note">
                                        <span><?php echo $this->__('Separate by commas or indicate each class in a new line'); ?></span>
                                    </p>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </form>
          </div>
        </td>
      </tr>
    </table>
    <form action="<?php echo $this->getResetUrl(); ?>" method="post" id="rewritesResetForm">
    <?php echo $this->getBlockHtml('formkey'); ?>
    </form>
</div>